Process Platform Process Plug-in |
The cordys.process plug-in is used to interact with the Process Platform BPM engine. This plug-in can be used to start a process, trigger a process instance, or retrieve process instance data. It uses the cordys.ajax plug-in to invoke the Web services.
Methods
The following methods are supported by the cordys.process plug-in:
Table 1. List of Methods
Method |
Description |
||
|---|---|---|---|
getBusinessIdentifiers(processInstance, options) |
Retrieves the business identifiers with their values for the given process instance
|
||
startProcess(processName, processMessage, options) |
Triggers a new process |
||
executeProcess(processInstance, processMessage, options) |
Sends a message to an existing process |
Note:
- All the
processInstanceparameters can either be aProcessInstanceobject or a string containing the identifier of the instance. - All the
optionsparameters are a collection of properties that are sent to the cordys.ajax call. In this collection, you can provide the specific parameters or a method to be called on completion. For more information, refer to Process Platform Ajax Plug-in. - For more information on the Process APIs, refer to Business Process APIs.
Return types
All the methods in this plug-in return a jQuery XHR object, which is the same as the object returned by the cordys.ajax plug-in.
Authentication
The cordys.authentication plug-in handles the authentication for connecting to the Process Platform server. For more information, refer to Authenticating Users with HTML5 SDK.
Examples
The following are the the sample code snippets:
$.cordys.process.startProcess("Expense Request Model", { ExpenseRequest: { '@xmlns': 'http://schemas.cordys.com/default', Expense: { EmployeeName: $("#fldName").val(), Reason: $("#fldReason").val(), Amount: $("#fldAmount").val() } } });
var identifiersModel = new $.cordys.model({ objectName: "BusinessIdentifier", context: document.getElementById("identifierList") }); $.cordys.process.getBusinessIdentifiers(processInstance).done(function(identifiers) { identifiersModel.BusinessIdentifier(identifiers); });